Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Function |saturating_to_u128

std/conv::|saturating_to_u128


Usage

|saturating_to_u128<T>(value)

Generics

◻ T: SaturatingToU128

Parameters

↳ value: T

Return

u128


Turns data into u128, saturating if needed.

This function makes a saturating and infaillible conversion to u128. If incoming data represents something out of bounds for u128, then the resulting value is set to minimum or maximum, depending what is the closest to truth.